package com.example.movie.data.cinema.model.bean

/**
 * 电影院信息数据类
 */
data class CinemaInfo(
    val cinemaId:Int,
    val cinemaName: String?,
    val lowestPrice: Float?,
    val location: String?,
    val distance: Float?,
    val cinemaFeatures: Array<String?>?,
    val other: Any?
) {
    override fun equals(other: Any?): Boolean {
        if (this === other) return true
        if (javaClass != other?.javaClass) return false

        other as CinemaInfo

        if (cinemaName != other.cinemaName) return false
        if (lowestPrice != other.lowestPrice) return false
        if (location != other.location) return false
        if (!cinemaFeatures.contentEquals(other.cinemaFeatures)) return false

        return true
    }

    override fun hashCode(): Int {
        var result = cinemaName.hashCode()
        result = 31 * result + lowestPrice.hashCode()
        result = 31 * result + location.hashCode()
        result = 31 * result + cinemaFeatures.contentHashCode()
        return result
    }
}